function index(tbl){
	var pageNumber=1;
	if(tbl.pageNumber!=undefined){
		pageNumber=tbl.pageNumber
	}
	var cnd=Cnd.where("1","=",1).desc("num")
	if(tbl.cid!=undefined&&tbl.cid!="0"){
		if(parseInt(tbl.cid)>6){
			var cate1=$fetch("cate",Cnd.where("id","=",tbl.cid))
			var cate0=$fetch("cate",Cnd.where("id","=",cate1.pid))
			cate0.put("list",$list("cate",Cnd.where("pid","=",cate0.id)))
			attr("cates",cate0)
			attr("cate1",cate1)
			cnd.and("cid2","=",tbl.cid)
		}else{
		var cates=$fetch("cate",Cnd.where("id","=",tbl.cid))
		cates.put("list",$list("cate",Cnd.where("pid","=",tbl.cid)))
		attr("cates",cates)
		cnd.and("cid1","=",tbl.cid)
		}
	}else{
		var cates=new Record()
		cates.put("list",cache.get("cates"))
		attr("cates",cates)
	}
	if(tbl.key!=undefined){
		cnd.and("(title like '%"+tbl.key+"%' or text like '%"+tbl.key+"%' or tag like '%"+tbl.key+"%')")
	}
	if(tbl.tag!=undefined){
		cnd.and("(title like '%"+tbl.tag+"%' or tag like '%"+tbl.tag+"%')")
	}
	if(tbl.ismf!=undefined){
		cnd.and("price","=",0)
	}else if(tbl.isvip!=undefined){
		cnd.and("vip","=",1)
	}else if(tbl.issf!=undefined){
		cnd.and("price",">",0)
	}else if(tbl.is_zb!=undefined){
		cnd.and("is_zb","=",1)
	}else if(tbl.is_px!=undefined){
		cnd.and("type","=",'培训')
	}else if(tbl.is_file!=undefined){
		cnd.and("is_file","=",1)
	}else if(tbl.is_exam!=undefined){
		cnd.and("is_exam","=",1)
	}else if(tbl.sort=="price_up"){
		cnd.asc("price")
	}else if(tbl.sort=="price_down"){
		cnd.desc("price")
	}else if(tbl.bnum!=undefined){
		cnd.desc("bnum")
	}else if(tbl.news!=undefined){
		cnd.desc("id")
	}
	var courses=$pager("course",cnd,pageNumber,24)
	return courses;
}